<template>
	<view class="">
		<uni-nav-bar shadow title="" @clickLeft="$wanlshop.back(1)" height="88rpx" :border="false" :fixed="true" backgroundColor="#FFFFFF"
			:shadow="false" left-icon="left"></uni-nav-bar>
			<view class="CardContainer2">
				<view class="" v-for="(i,n) in brand" :key='n' >
					<!-- <text>{{i.text}}</text> -->
					<view class="" @click="showQrcode(i)">
						<image :src="i.image" style="width: 226rpx;height: 50rpx;margin: 20rpx 0;" mode=""></image>
					</view> 
				</view>
			</view>
				<uni-popup is-mask-click='true' :mask-click='true' style="background-color:rgba(0,0,0,.4);" id="adModal"
				ref="adModal" type="dialog">
						<view class="" style="text-align: center;margin-top:400rpx">
							<image v-if="image" style="width: 400rpx;height: 400rpx;" :src="image" mode=""></image>
						</view>
			</uni-popup>
	</view>
</template>

<script>
	export default {
		props: {

		},
		data() {
			return {
				brand:[],
				mechanism:[],
				image:""

			}
		},
		created() {
			this.getListData()
		},

		methods: {
			getListData() {
				this.$api.get({
					url: '/index/index',
			
					success: res => {
						console.log(res)
						
						this.mechanism= res.mechanism
						this.brand = res.brand
					
						
					}
				})
			},
			showQrcode(i){
				console.log(i)
					this.image = i.line_image
					this.$refs['adModal'].open()
			}
			}	
			

	}
</script>

<style lang="scss">
	.CardContainer2{
		background: #fff;
		padding: 20rpx ;
		font-size: 20rpx;
		color: #333;
		display: flex;
		flex-wrap: wrap;
		// margin: 0 30rpx 30rpx;
		justify-content: space-between;
		.ccmain {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 33.33%;
		
			// text-align: center;
			.ccimg {
				width: 92rpx;
				height: 92rpx;
				margin-left: 10rpx;
		
				image {
					width: 100%;
					height: 100%;
				}
			}
		}
		.city{
			display: flex;
			justify-content: space-between;
			margin-top: 20rpx;
			view{
				width: 100px;
				border: 2rpx solid #e2e2e2;
				text-align: center;
				
			}
		}
	}
</style>
